package com.soen341.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import com.soen341.model.enums.SemesterEnum;
 
//--------------------------------------------------------------------------------------------------------------------------------
/**
* Model class for Prerequisite
*/
//--------------------------------------------------------------------------------------------------------------------------------
@Entity
@Table(name = "courseset")
/*@NamedQueries(
		{
			@NamedQuery(name = "Sequence.getCourseSet",
			query = "SELECT s FROM CourseSet s where s.courseSetId=:sequenceId")
		})*/
public class CourseSet implements Serializable
{
	private static final long serialVersionUID = 1L;	// Default serial version ID

	@Id
	private Long id;

	@Column(name="courseId")
	private String courseId;

	// TODO: consider changing enum to simple int (1,2,3,4)
	@Column(name="semester")
	@Enumerated(EnumType.STRING)
	private SemesterEnum semester;

	// TODO: consider changing it to int level instead of courseYear
	@Column(name="courseYear")	// can be 1 (1st), 2 (2nd), 3 (third) or 4 (4th)
	private int courseYear;

	// --------------------------------------------------------------------------------------------------------------------------------
	/**
	 * 	Constructor.
	 */
	// --------------------------------------------------------------------------------------------------------------------------------
	public CourseSet()
	{
	}

	// --------------------------------------------------------------------------------------------------------------------------------
	/**
	 * Setters and getters.
	 */
	// --------------------------------------------------------------------------------------------------------------------------------
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}

	public SemesterEnum getSemester() {
		return semester;
	}

	public void setSemester(SemesterEnum semester) {
		this.semester = semester;
	}

	public int getCourseYear() {
		return courseYear;
	}

	public void setCourseYear(int courseYear) {
		this.courseYear = courseYear;
	}
}